package com.leyou.auth.clients;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("auth-service")
public interface AuthClient {
    /**
     * 根据服务的id以及服务的密码，生成服务对应的token
     *
     * @param id
     * @param secret
     * @return
     */
    @GetMapping("authorization")
    String authorize(
            @RequestParam("id") Long id,
            @RequestParam("secret") String secret);
}
